import request from '@/plugins/axios'
import { IVideoEpisodeAddForm, IVideoEpisodeEditForm } from '@/views/vision/video.interface'
/**
 * 视频列表
 */
export const visionlist = (params: any) => request.get('/video.video/lists', { params })

/**
 * 新增视频
 */
export const addvisionlist = (params: any) => request.post('/video.video/add', { ...params })

/**
 * 修改视频
 */
export const joinModifyVideoDetail = (params: any) => request.post('/video.video/edit', { ...params })

/**
 * 视频详情
 */
export const detailsvisilist = (params: any) => request.get('/video.video/detail', params)

/**
 * 删除视频
 */
export const delvisilist = (params: any) => request.post('/video.video/delete', params)

/**
 * 视频章节列表
 * adminapi/video.videoItem/lists?page_size=20&page_no=1&video_id=2
 */
export const joinVideoEpisodelist = (params: any) => request.get('/video.videoItem/lists', { params })



/**
 * 视频章节详情
 */
export const detailvideochapterslist = (params: any) => request.post('/video.videoItem/detail', { params })


/**
 * 分销列表
 */
export const joinDistributionLevel = (params: any) => request.get('/distribution.distributionLevel/lists', params)

/**
 * 添加剧集 新增视频章节
 * @param { IVideoEpisodeAddForm } params 
 * @returns 
 */
export const joinVideoEpisodeAdd = (params:IVideoEpisodeAddForm) => request.post('/video.videoItem/add', params)


/**
 *  修改视频章节
 */
export const joinVideoEpisodeEdit = (params: IVideoEpisodeEditForm) => request.post('/video.videoItem/edit', params)

/**
 * 删除视频章节
 */
export const joinVideoEpisodeDel = (params: any) => request.post('/video.videoItem/delete', params)
/**
 * 视频上传Token
 */
export const getQiniuToken = (params: any) => request.get('/upload/getQiniuToken', { params })

/**
 * 批量上传短剧集数
 * @param params 
 * @returns 
 */
export const videoBatchAdd = (params: any) => request.post('/video.videoItem/addAll', params)